package GUI;


import java.awt.Font;
import java.io.Serializable;

import javax.swing.JButton;

public class Objekte_anlegen extends GrundVorlageObjekte implements Serializable {
	JButton btnBildURL;
	JButton btnVorschau;
	JButton btnSpeichern;
	/**
	 * Create the panel.
	 */
	public Objekte_anlegen() {
	init();
	btnBildURL = new JButton("Bild URL");
	btnBildURL.setFont(new Font("Lucida Sans", Font.PLAIN, 11));
	btnBildURL.setBounds(530, 522, 100, 20);
	GrundVorlageObjekte.panel.add(btnBildURL);
	
	btnVorschau = new JButton("Vorschau");
	btnVorschau.setFont(new Font("Lucida Sans", Font.PLAIN, 11));
	btnVorschau.setBounds(640, 522, 100, 20);
	panel.add(btnVorschau);
	
	btnSpeichern = new JButton("Speichern");
	btnSpeichern.setFont(new Font("Lucida Sans", Font.PLAIN, 11));
	btnSpeichern.setBounds(750, 522, 100, 20);
	panel.add(btnSpeichern);
	registerEvents();
		
	}	class MyMouseAdapter extends java.awt.event.MouseAdapter {
		public void mouseClicked(java.awt.event.MouseEvent event) {
			Object object = event.getSource();
			
			if(btnSpeichern==object){
				save();
				startWerteObjekt();
			} 
			if(btnVorschau==object){
				System.out.println("WAS");
			}
			
			
		}
		}	
	public void registerEvents() {
			MyMouseAdapter mouse = new MyMouseAdapter();
			
			btnSpeichern.addMouseListener(mouse);
		}
}
